3.8.40 \(\int x^{-3+n} (a+b x)^{-n} \, dx\) [740]

Optimal. Leaf size=64 \[ -\frac {x^{-2+n} (a+b x)^{1-n}}{a (2-n)}+\frac {b x^{-1+n} (a+b x)^{1-n}}{a^2 (1-n) (2-n)} \]

[Out]

-x^(-2+n)*(b*x+a)^(1-n)/a/(2-n)+b*x^(-1+n)*(b*x+a)^(1-n)/a^2/(1-n)/(2-n)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {47, 37} \begin {gather*} \frac {b x^{n-1} (a+b x)^{1-n}}{a^2 (1-n) (2-n)}-\frac {x^{n-2} (a+b x)^{1-n}}{a (2-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-3 + n)/(a + b*x)^n,x]

[Out]

-((x^(-2 + n)*(a + b*x)^(1 - n))/(a*(2 - n))) + (b*x^(-1 + n)*(a + b*x)^(1 - n))/(a^2*(1 - n)*(2 - n))

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*(Simplify[m + n + 2]/((b*c - a*d)*(m + 1))), Int[(a + b*x)^Simplify[m +
1]*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && ILtQ[Simplify[m + n + 2], 0] &&
 NeQ[m, -1] &&  !(LtQ[m, -1] && LtQ[n, -1] && (EqQ[a, 0] || (NeQ[c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && (
SumSimplerQ[m, 1] ||  !SumSimplerQ[n, 1])

Rubi steps

\begin {align*} \int x^{-3+n} (a+b x)^{-n} \, dx &=-\frac {x^{-2+n} (a+b x)^{1-n}}{a (2-n)}-\frac {b \int x^{-2+n} (a+b x)^{-n} \, dx}{a (2-n)}\\ &=-\frac {x^{-2+n} (a+b x)^{1-n}}{a (2-n)}+\frac {b x^{-1+n} (a+b x)^{1-n}}{a^2 (1-n) (2-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 39, normalized size = 0.61 \begin {gather*} \frac {x^{-2+n} (a+b x)^{1-n} (a (-1+n)+b x)}{a^2 (-2+n) (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-3 + n)/(a + b*x)^n,x]

[Out]

(x^(-2 + n)*(a + b*x)^(1 - n)*(a*(-1 + n) + b*x))/(a^2*(-2 + n)*(-1 + n))

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 44, normalized size = 0.69

method result size
gosper \(\frac {x^{-2+n} \left (a n +b x -a \right ) \left (b x +a \right ) \left (b x +a \right )^{-n}}{\left (-2+n \right ) \left (-1+n \right ) a^{2}}\) \(44\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-3+n)/((b*x+a)^n),x,method=_RETURNVERBOSE)

[Out]

x^(-2+n)*(a*n+b*x-a)*(b*x+a)/((b*x+a)^n)/(-2+n)/(-1+n)/a^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-3+n)/((b*x+a)^n),x, algorithm="maxima")

[Out]

integrate(x^(n - 3)/(b*x + a)^n, x)

________________________________________________________________________________________

Fricas [A]
time = 1.45, size = 64, normalized size = 1.00 \begin {gather*} \frac {{\left (a b n x^{2} + b^{2} x^{3} + {\left (a^{2} n - a^{2}\right )} x\right )} x^{n - 3}}{{\left (a^{2} n^{2} - 3 \, a^{2} n + 2 \, a^{2}\right )} {\left (b x + a\right )}^{n}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-3+n)/((b*x+a)^n),x, algorithm="fricas")

[Out]

(a*b*n*x^2 + b^2*x^3 + (a^2*n - a^2)*x)*x^(n - 3)/((a^2*n^2 - 3*a^2*n + 2*a^2)*(b*x + a)^n)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-3+n)/((b*x+a)**n),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-3+n)/((b*x+a)^n),x, algorithm="giac")

[Out]

integrate(x^(n - 3)/(b*x + a)^n, x)

________________________________________________________________________________________

Mupad [B]
time = 0.45, size = 80, normalized size = 1.25 \begin {gather*} \frac {\frac {x\,x^{n-3}\,\left (n-1\right )}{n^2-3\,n+2}+\frac {b^2\,x^{n-3}\,x^3}{a^2\,\left (n^2-3\,n+2\right )}+\frac {b\,n\,x^{n-3}\,x^2}{a\,\left (n^2-3\,n+2\right )}}{{\left (a+b\,x\right )}^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 3)/(a + b*x)^n,x)

[Out]

((x*x^(n - 3)*(n - 1))/(n^2 - 3*n + 2) + (b^2*x^(n - 3)*x^3)/(a^2*(n^2 - 3*n + 2)) + (b*n*x^(n - 3)*x^2)/(a*(n
^2 - 3*n + 2)))/(a + b*x)^n

________________________________________________________________________________________